<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>指尖上行</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="../../css/css.css">
<link rel="stylesheet" href="../../css/HomeNewsList.css">
<link rel="stylesheet" href="../../../bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="../../../bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../../../bower_components/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="../../../bower_components/Ionicons/css/ionicons.min.css">
<link rel="stylesheet" href="../../../dist/css/AdminLTE.min.css">
<link rel="stylesheet" href="../../../dist/css/skins/_all-skins.min.css">
<link rel="stylesheet" href="../../../bower_components/jvectormap/jquery-jvectormap.css">
<link rel="stylesheet" href="../../../bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
<link rel="stylesheet" href="../../../bower_components/bootstrap-daterangepicker/daterangepicker.css">
<link rel="stylesheet" href="../../../plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition skin-blue sidebar-mini"  data-treeview="1" data-treeview-menu="2">
<div class="wrapper">
  <header class="main-header"> <a class="logo"> <span class="logo-mini"><b>指</b></span> <span class="logo-lg"><img src="../../img/logo.png"/></span></a>
    <nav class="navbar navbar-static-top"><a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button"></a></nav>
  </header>
  <aside class="main-sidebar">
    <section class="sidebar">
      <ul class="sidebar-menu" data-widget="tree">
      </ul>
    </section>
  </aside>
  <div class="content-wrapper">
    <section class="content-search">
      <div class="form-group">
        <label>名称</label>
        <input type="text" class="form-control w140" placeholder="名称" id="informationName1">
      </div>
      <div class="form-group">
        <label>栏目</label>
        <select class="form-control w140" id="channelType1">
        </select>
      </div>
      <div class="form-group">
        <label>资讯类型</label>
        <select class="form-control w140" id="informationType1">
        </select>
      </div>
      <div class="form-group">
        <label>作者</label>
        <input type="text" class="form-control w140" placeholder="作者" id="author1">
      </div>
      <div class="form-group">
        <label>更新时间</label>
        <div class="input-group date w140 fl">
          <div class="input-group-addon"> <i class="fa fa-calendar"></i> </div>
          <input type="text" class="form-control pull-right" id="datepicker">
        </div>
        <span>到</span>
        <div class="input-group date w140 fl">
          <div class="input-group-addon"> <i class="fa fa-calendar"></i> </div>
          <input type="text" class="form-control pull-right" id="datepicker2">
        </div>
      </div>
      <div class="form-group">
        <label>是否显示</label>
        <select class="form-control w140" id="isShow1">
          <option>全部</option>
          <option>是</option>
          <option>否</option>
        </select>
      </div>
      <div class="form-group">
        <button type="button" class="btn btn-primary searchbtn">搜索</button>
      </div>
    </section>
    <section class="content-header">
      <button type="button" class="btn btn-primary addupdate" data-toggle="modal" data-target="#modal-addupdate">新建资讯</button>
      <button type="button" class="btn btn-primary isshow" data-toggle="modal" data-target="#modal-isshow" data-isshow="0">批量显示</button>
      <button type="button" class="btn btn-primary isshow" data-toggle="modal" data-target="#modal-isshow" data-isshow="1">批量隐藏</button>
      <button type="button" class="btn btn-primary isstick" data-toggle="modal" data-target="#modal-isstick" data-isstick="0">批量置顶</button>
      <button type="button" class="btn btn-primary isstick" data-toggle="modal" data-target="#modal-isstick" data-isstick="1">批量取消置顶</button>
      <button type="button" class="btn btn-primary delete" data-toggle="modal" data-target="#modal-delete">批量删除</button>
      <button type="button" class="btn btn-primary Weight" data-toggle="modal" data-target="#modal-Weight">批量修改权重</button>
    </section>
    <!-- 新建修改窗口 -->
    <div class="modal fade" id="modal-addupdate" style="display: none;">
      <div class="modal-dialog w700">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">新建资讯</h4>
          </div>
          <div class="modal-body">
            <div class="box box-primary">
              <div class="box-body">
                <div class="form-group">
                  <label>标题</label>
                  <input type="hidden" id="id">
                  <input type="text" class="form-control w400" placeholder="请输入标题" id="informationName">
                </div>
                <div class="form-group">
                  <label>所属栏目</label>
                  <select class="form-control w250" id="channelType2">
                  </select>
                  <select class="form-control w140" id="informationType2" disabled>
                  </select>
                </div>
                <div class="form-group">
                  <label>作者</label>
                  <input type="text" class="form-control w400" placeholder="请输入作者" id="author">
                </div>
                <div class="form-group">
                  <label>排序权重</label>
                  <input type="text" class="form-control w400" placeholder="请输入排序权重" id="rank">
                </div>
                <div class="form-group">
                  <label>是否显示</label>
                  <select class="form-control w250" id="isShow">
                    <option>是</option>
                    <option>否</option>
                  </select>
                </div>
                <div class="form-group">
                  <label>图片上传</label>
                  <input id="lefile1" type="file" name="myfile" style="display:none">
                  <input id="photoCover1" class="form-control w180" type="text">
                  <a class="btn upload" onclick="$('input[id=lefile1]').click();">选择文件 <i class="glyphicon glyphicon-folder-open" aria-hidden="true"></i></a>
                  <div class="imgfile1"></div>
                </div>
                <div class="form-group">
                  <label class="fl">资讯内容</label>
                  <div class="fl" style="margin-left:4px">
                    <form>
                      <textarea id="editor1" name="editor1" rows="10" cols="80"></textarea>
                    </form>
                  </div>
                </div>
                <div class="form-group">
                  <label>关联内容</label>
                  <select class="form-control w250" id="relevance">
                    <option>直播</option>
                    <option>竞猜</option>
                    <option>赛事</option>
                    <option>商城</option>
                    <option>代练</option>
                  </select>
                  <input type="text" class="form-control w180" placeholder="请输入关联的ID" id="relevanceId">
                </div>
              </div>
            </div>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btnaddupdate">提交</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 预览窗口 -->
    <div class="modal fade" id="modal-view" style="display: none;">
      <div class="modal-dialog w700">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">预览资讯</h4>
          </div>
          <div class="modal-body">
            <div class="box box-primary">
              <div class="box-body">
                <div class="form-group">
                  <label>标题</label>
                  <span class="informationName"></span> </div>
                <div class="form-group">
                  <label>所属栏目</label>
                  <span class="channelType2"></span> </div>
                <div class="form-group">
                  <label>栏目类型</label>
                  <span class="informationType2"></span> </div>
                <div class="form-group">
                  <label>作者</label>
                  <span class="author"></span> </div>
                <div class="form-group">
                  <label>排序权重</label>
                  <span class="rank"></span> </div>
                <div class="form-group">
                  <label>是否显示</label>
                  <span class="isShow"></span> </div>
                <div class="form-group">
                  <label>封面图片</label>
                  <span class="photoCover1"></span>
                  <div class="imgfile1"></div>
                </div>
                <div class="form-group">
                  <label class="fl">资讯内容</label>
                  <div class="fl" style="margin-left:4px">
                    <form>
                      <textarea id="editor2" name="editor2" rows="10" cols="80" disabled></textarea>
                    </form>
                  </div>
                </div>
                <div class="form-group">
                  <label>关联内容</label>
                  <span class="relevance"></span>
                  <label>关联ID</label>
                  <span class="relevanceId"></span> </div>
              </div>
            </div>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">返回</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 删除窗口 -->
    <div class="modal fade" id="modal-delete" style="display: none;">
      <div class="modal-dialog w400">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">确认</h4>
          </div>
          <div class="modal-body">确认删除该数据吗？</div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btndelete">确认</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 显示窗口 -->
    <div class="modal fade" id="modal-isshow" style="display: none;">
      <div class="modal-dialog w400">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">确认</h4>
          </div>
          <div class="modal-body">确认显示隐藏？</div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btnisshow">确认</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 置顶窗口 -->
    <div class="modal fade" id="modal-isstick" style="display: none;">
      <div class="modal-dialog w400">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">确认 </h4>
          </div>
          <div class="modal-body"></div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btnisstick">确认</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 批量修改权重窗口 -->
    <div class="modal fade" id="modal-Weight" style="display: none;">
      <div class="modal-dialog w400">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">批量修改权重</h4>
          </div>
          <div class="modal-body">
            <div class="form-group">
              <label>排序权重</label>
              <input type="text" class="form-control w180 updaterank" placeholder="请输入排序权重">
            </div>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btnWeight">确认</button>
          </div>
        </div>
      </div>
    </div>
    <section class="content">
      <div class="box">
        <div class="box-header">
          <h3 class="box-title">资讯内容列表</h3>
        </div>
        <div class="box-body">
          <table id="example1" class="table table-bordered table-striped">
          </table>
          <div class="paginationDiv">
            <ul class="pagination">
              <li class="prev"><a>上一页</a></li>
              <li class="next"><a>下一页</a></li>
            </ul>
            <input type="text" value="1" class="form-control curpage"/>
            <button type="button" class="btn btn-default gopage">跳转</button>
            <span class="pageinfo"></span> </div>
        </div>
      </div>
    </section>
  </div>
</div>
<script type="text/html" id="datalist">
	<thead>
	  <tr role="row">
		<th><input type="checkbox" class="allcheck"></th>
		<th>ID</th>
		<th>图片</th>
		<th>资讯名称</th>
		<th>资讯类型</th>
		<th>所属栏目</th>
		<th>作者</th>
		<th>是否置顶</th>
		<th>更新时间</th>
		<th>是否显示</th>
		<th>关联</th>
		<th>数据</th>
		<th>设置</th>
	  </tr>
    </thead>
	<tbody>
	<%for(var i = 0,len= dataset.length;i < len;i++){%>
	  <tr role="row">
		<td><input type="checkbox" name="items" value="<%= dataset[i].id%>"></td>
		<td><%= dataset[i].id%></td>
		<td><img src="<%= dataset[i].pictureUrl==null?'../../img/defeat.png':dataset[i].pictureUrl%>" width="80px" /></td>
		<td><%= dataset[i].informationName%></td>
		<td><%= dataset[i].informationType%></td>
		<td><%= dataset[i].belongsChannel%></td>
		<td><%= dataset[i].author%></td>
		<td><%= dataset[i].isStick==0?"是":"否"%></td>
		<td><%= dataset[i].updateTime.substring(0,19)%></td>
		<td><%= dataset[i].isShow==0?"是":"否"%></td>
		<td><%= dataset[i].relevance%>：关联ID<%= dataset[i].relevanceId%></td>
		<td><%= dataset[i].hits==null?0:dataset[i].hits%></td>
		<td>
		  <button type="button" class="btn  btn-info btn-xs view" data-toggle="modal" data-target="#modal-view" data-id="<%= dataset[i].id%>">预览</button>
		  <button type="button" class="btn  btn-info btn-xs addupdate" data-toggle="modal" data-target="#modal-addupdate" data-id="<%= dataset[i].id%>">修改</button>
		  <button type="button" class="btn  btn-info btn-xs delete" data-toggle="modal" data-target="#modal-delete" data-id="<%= dataset[i].id%>">删除</button>
		 </td>
      </tr>
	<%}%>
    </tbody>
</script> 
<script type="text/html" id="selectlist1">
    <option data-id="0">全部</option>
	<%for(var i = 0,len= dataset.length;i < len;i++){%>
	   <option data-id="<%= dataset[i].id%>"><%= dataset[i].channelName%></option>
	<%}%>
</script> 
<script type="text/html" id="selectlist2">
	<%for(var i = 0,len= dataset.length;i < len;i++){%>
	   <option data-id="<%= dataset[i].id%>" data-channelType="<%= dataset[i].channelType%>" data-channelId="<%= dataset[i].channelId%>"><%= dataset[i].channelName%></option>
	<%}%>
</script> 
<script type="text/html" id="selectlist3">
    <option data-id="0">全部</option>
	<%for(var i = 0,len= dataset.length;i < len;i++){%>
	   <option data-id="<%= dataset[i].id%>"><%= dataset[i].enumName%></option>
	<%}%>
</script> 
<script type="text/html" id="selectlist4">
	<%for(var i = 0,len= dataset.length;i < len;i++){%>
	   <option data-id="<%= dataset[i].id%>"><%= dataset[i].enumName%></option>
	<%}%>
</script> 
<script src="../../../bower_components/jquery/dist/jquery.min.js"></script> 
<script src="../../../bower_components/jquery-ui/jquery-ui.min.js"></script> 
<script src="../../../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> 
<script src="../../../bower_components/raphael/raphael.min.js"></script> 
<script src="../../../bower_components/jquery-sparkline/dist/jquery.sparkline.min.js"></script> 
<script src="../../../plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script> 
<script src="../../../plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script> 
<script src="../../../bower_components/jquery-knob/dist/jquery.knob.min.js"></script> 
<script src="../../../bower_components/moment/min/moment.min.js"></script> 
<script src="../../../bower_components/bootstrap-daterangepicker/daterangepicker.js"></script> 
<script src="../../../bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script> 
<script src="../../../bower_components/bootstrap-datepicker/dist/locales/bootstrap-datepicker.zh-CN.min.js"></script> 
<script src="../../../plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script> 
<script src="../../../bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script> 
<script src="../../../bower_components/fastclick/lib/fastclick.js"></script> 
<script src="../../../dist/js/adminlte.min.js"></script> 
<script src="../../../bower_components/ckeditor/ckeditor.js"></script> 
<script src="../../js/template-web.js"></script> 
<script src="../../js/js.js"></script> 
<script src="../../js/HomeNewsList.js"></script> 
<script>
  $(function () {
	CKEDITOR.replace('editor1')
	CKEDITOR.replace('editor2')
	$('#datepicker').datepicker({format:"yyyy-mm-dd",language:"zh-CN",autoclose: true,todayHighlight:true});
	$('#datepicker2').datepicker({format:"yyyy-mm-dd",language:"zh-CN",autoclose: true,todayHighlight:true});
  })
</script>
</body>
</html>
